package com.itqf.proxy.static_proxy1.impl;

import com.itqf.proxy.static_proxy1.OrderService;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/11/10
 * @Time: 上午10:25
 */
public class OrderServiceImpl implements OrderService {
    @Override
    public void addOrder() {
        try {
            System.out.println("开启事务"); //辅助代码
            System.out.println("add order!!!.....");//核心业务
            System.out.println("提交事务");
        } catch (Exception e) {
            System.out.println("回滚事务");
        }
    }

    @Override
    public void updateOrder() {
        try {
            System.out.println("开启事务");
            System.out.println("update order!!!.....");
            System.out.println("提交事务");
        } catch (Exception e) {
            System.out.println("回滚事务");
        }
    }
}
